
#include "widget.h"


Widget::Widget(QWidget *parent)
    : QWidget(parent)

{

    setFixedSize(8*64,8*64);
    pMap=new QPainter;
    pMap=new QPainter(this);
}

Widget::~Widget()
{

}

void Widget::keyPressEvent(QKeyEvent *event)
{
    pBox->keyDown(event);
}

void Widget::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event);
    pMap->begin(this);
    pBox->drawMap(pMap);
    pMap->end();
    update();
}



